#pragma once

#include<string>
#include<functional>

namespace wbj
{
    using func_t=std::function<void(int,std::string,uint16_t)>;

    class Task
    {
    public:
    Task()
    {}

    Task(int sock,const std::string& ip,const uint16_t& port,const func_t& func)
    :_sock(sock),_ip(ip),_port(port),_func(func)
    {}

    void operator()()
    {
        _func(_sock,_ip,_port);
    }

    Task(int sock)

    private:
        int _sock;
        std::string +ip;
        uint16_t _port;
        func_t _func;
    };
}